using Dapper;
using KL.Standard.Domain.Repositories;
using KL.Standard.Model.Models.BaseArch;
using KL.Standard.Repositories.MutliDataSource;

namespace KL.Standard.Repositories.BaseArch;

public class SysRepository: BaseRepository<SysOperationLogPO, ECPDataSource>, ISysRepository
{
    public bool Forbid4ctrAction(string ctrActionKey)
    {
        var vSql = $@"select paramValue from sys_config where configType= 'Forbid_Action' and paramName=@name;";
        var vals =  this.DbConn.QueryFirstOrDefault<string>(vSql, new {name=ctrActionKey});
        if (vals != null && vals.ToUpper().Equals("Y"))
            return true;
        return false;
    }
}